#ifndef WINDOWHEXCONVERT_H
#define WINDOWHEXCONVERT_H

#include <QComboBox>
#include <QHBoxLayout>
#include <QLabel>
#include <QLineEdit>
#include <QMainWindow>
#include <QMessageBox>
#include <QPlainTextEdit>
#include <QPushButton>
#include <QVBoxLayout>
#include <QWidget>

QT_BEGIN_NAMESPACE
namespace Ui {
class WindowHexConvert;
}
QT_END_NAMESPACE

class WindowHexConvert : public QMainWindow
{
    Q_OBJECT

public:
    WindowHexConvert(QWidget *parent = nullptr);
    ~WindowHexConvert();

signals:
    void showMessageInStatusBar(const QString &msg);

private slots:
    void onPlainText1Changed();
    void onEncodingChanged();
    void onBtnSwapClicked();
    void doConvert();

private:
    QLabel *label1;
    QLabel *label2;
    QPlainTextEdit *plainText1;
    QPlainTextEdit *plainText2;

    QComboBox *comboEncoding;
    QPushButton *btnSwap;

    bool isSwaped;
};
#endif // WINDOWHEXCONVERT_H
